<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
//    var s = 'frank';
//    var s = "tom";

    var s = "a\"aa";
    var s2 = "a\"\"aa";

    document.writeln(s);
    document.writeln(s2);

    var x = 'b\'\'b""""""b'
    console.info(x);

    var y = '你好：\n我叫\t陈\\\\俊';
    console.log(y);

    var x = "hello";
    var y = "world";
    z = x + y;
    console.log(z);
    z = "aa"+"bb"+"cc";
    console.log(z);

    //字符串拼接
    var uName = "小明";
    var age = 19;
    var s = "你好" + uName + ",我今年" + age + "岁啦!" + 9;
    //"你好小明，我今年19岁啦！"
    console.log(s);


    //现在不要用，是es6中的语法。多数浏览器还不支持
    var userinfo = `
    你好，
    我叫陈俊
`;
    var userinfo2 = `
    你好${uName}，我今年${age}岁啦！
`;

    console.log(userinfo);
    console.log(userinfo2);

    //字符串也是数组
    var a = 'f  ra     nk';
    var l = a.length;
    console.log(l);

</script>
</body>
</html>